@ecency/render-helper 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser/index.d.ts
CHANGED
|
@@ -61,6 +61,14 @@ declare function proxifyImageSrc(url?: string, width?: number, height?: number,
|
|
|
61
61
|
*/
|
|
62
62
|
declare function buildSrcSet(url?: string): string;
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* The `sizes` value the renderer applies to in-body post images (see `img()`
|
|
66
|
+
* and `createImageHTML()`). Exported as the single source of truth so consumers
|
|
67
|
+
* preloading the LCP image (`<link rel="preload" as="image" imagesizes>`) can
|
|
68
|
+
* match the exact srcset candidate the rendered <img> selects.
|
|
69
|
+
*/
|
|
70
|
+
declare const IMAGE_SIZES = "(max-width: 768px) 100vw, 700px";
|
|
71
|
+
|
|
64
72
|
declare function setCacheSize(size: number): void;
|
|
65
73
|
|
|
66
74
|
declare const SECTION_LIST: string[];
|
|
@@ -77,4 +85,4 @@ declare function isValidPermlink(permlink: string): boolean;
|
|
|
77
85
|
*/
|
|
78
86
|
declare function simpleMarkdownToHTML(input: string): string;
|
|
79
87
|
|
|
80
|
-
export { type Entry, type RenderOptions, SECTION_LIST, type SeoContext, buildSrcSet, catchPostImage, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
|
|
88
|
+
export { type Entry, IMAGE_SIZES, type RenderOptions, SECTION_LIST, type SeoContext, buildSrcSet, catchPostImage, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
|
package/dist/browser/index.js
CHANGED
|
@@ -1242,7 +1242,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
|
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
1244
|
el.setAttribute("class", "markdown-external-link");
|
|
1245
|
-
if (!/^((#)|(mailto:)|(\/(?!\/))|(((steem|hive|esteem|ecency|https?):)?\/\/))
|
|
1245
|
+
if (!/^((#)|(mailto:)|(\/(?!\/))|(((steem|hive|esteem|ecency|https?):)?\/\/))/i.test(href)) {
|
|
1246
1246
|
href = `https://${href}`;
|
|
1247
1247
|
}
|
|
1248
1248
|
if (forApp) {
|
|
@@ -2048,6 +2048,6 @@ function getPostBodySummary(obj, length, platform) {
|
|
|
2048
2048
|
return res;
|
|
2049
2049
|
}
|
|
2050
2050
|
|
|
2051
|
-
export { SECTION_LIST, buildSrcSet, catchPostImage, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
|
|
2051
|
+
export { IMAGE_SIZES, SECTION_LIST, buildSrcSet, catchPostImage, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
|
|
2052
2052
|
//# sourceMappingURL=index.js.map
|
|
2053
2053
|
//# sourceMappingURL=index.js.map
|